projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c40398e
)
Don't mutate literals in tabulated-list-widen-current-column
author
Lars Ingebrigtsen
<larsi@gnus.org>
Tue, 25 Jan 2022 13:21:22 +0000
(14:21 +0100)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Tue, 25 Jan 2022 13:21:22 +0000
(14:21 +0100)
* lisp/emacs-lisp/tabulated-list.el
(tabulated-list-widen-current-column): Avoid mutating constants
(bug#53501).
lisp/emacs-lisp/tabulated-list.el
patch
|
blob
|
history
diff --git
a/lisp/emacs-lisp/tabulated-list.el
b/lisp/emacs-lisp/tabulated-list.el
index 2defef81073ff2b3d8c6d14e8b834cf8174ea987..b740a7457af9bd93638ce24a0042a018556791a7 100644
(file)
--- a/
lisp/emacs-lisp/tabulated-list.el
+++ b/
lisp/emacs-lisp/tabulated-list.el
@@
-755,6
+755,9
@@
Interactively, N is the prefix numeric argument, and defaults to
1))))
(setq col-nb (1+ col-nb))
(setq found t)
+ ;; `tabulated-list-format' may be a constant (sharing list
+ ;; structures), so copy it before mutating.
+ (setq tabulated-list-format (copy-tree tabulated-list-format t))
(setf (cadr (aref tabulated-list-format col-nb))
(max 1 (+ col-width n)))
(tabulated-list-print t)